<?php if (!defined('THINK_PATH')) exit(); /*a:3:{s:77:"D:\program\phpStudy\WWW\2188\public/../application/admin\view\data_index.html";i:1550467059;s:70:"D:\program\phpStudy\WWW\2188\application\admin\view\public_header.html";i:1543251271;s:68:"D:\program\phpStudy\WWW\2188\application\admin\view\public_left.html";i:1548998499;}*/ ?>
<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <title>后台管理</title>

    <script src="/static/jquery-2.js"></script>
    <script src="/static/layui/layui.js"></script>
    <link rel="stylesheet" href="/static/layui/css/layui.css">
</head>
<body class="layui-layout-body">
<div class="layui-layout layui-layout-admin">

    <div class="layui-header">
    <div class="layui-logo" style="width: 400px;"> 短期胰岛素泵强化治疗血糖监算器 后台管理</div>

    <ul class="layui-nav layui-layout-right">
        <li class="layui-nav-item"><a href="<?php echo url('index/index'); ?>"  >后台首页</a></li>


        <li class="layui-nav-item">
            <a href="javascript:;">
                <!--<img src="http://t.cn/RCzsdCq" class="layui-nav-img">-->
                用户：<?php echo \think\Session::get('username'); ?>
            </a>

        </li>

        <li class="layui-nav-item"><a href="#" id="logout">退了</a></li>
    </ul>
</div>
    <div class="layui-side layui-bg-black">
    <div class="layui-side-scroll">
        <!-- 左侧导航区域（可配合layui已有的垂直导航） -->
        <ul class="layui-nav layui-nav-tree"  lay-filter="test">
            <li class="layui-nav-item layui-nav-itemed">
                <a class="" href="javascript:;">治疗信息</a>
                <dl class="layui-nav-child">
                    <dd <?php if($t == 1): ?> class="layui-this" <?php endif; ?>><a href="<?php echo url('Treat/treatlist'); ?>">起始治疗方案</a></dd>
                    <dd <?php if($t == 2): ?> class="layui-this" <?php endif; ?>><a  href="<?php echo url('Treat/blood'); ?>">血糖监测</a></dd>
                    <dd <?php if($t == 3): ?> class="layui-this" <?php endif; ?>><a href="<?php echo url('Treat/beforeeating'); ?>">餐前大剂量</a></dd>

                    <dd <?php if($t == 4): ?> class="layui-this" <?php endif; ?>><a href="<?php echo url('Treat/temporary'); ?>">临时大剂量</a></dd>

                </dl>
            </li>
            <li class="layui-nav-item layui-nav-itemed">
                <a class="" href="javascript:;">用户管理</a>
                <dl class="layui-nav-child">
                    <dd <?php if($t == 5): ?> class="layui-this" <?php endif; ?>><a href="<?php echo url('Admin/index'); ?>">系统管理员列表</a></dd>
                    <dd <?php if($t == 6): ?> class="layui-this" <?php endif; ?>><a href="<?php echo url('User/index'); ?>">用户管理</a></dd>
                    <dd <?php if($t == 8): ?> class="layui-this" <?php endif; ?>><a href="<?php echo url('Data/index'); ?>">导出管理</a></dd>
                </dl>
            </li>
            <li class="layui-nav-item layui-nav-itemed">
                <a class="" href="javascript:;">系统管理</a>
                <dl class="layui-nav-child">
                    <dd <?php if($t == 7): ?> class="layui-this" <?php endif; ?>><a href="<?php echo url('Wechat/index'); ?>">微信设置</a></dd>
                </dl>
            </li>
           <!-- <li class="layui-nav-item layui-nav-itemed">
                <a class="" href="javascript:;">评论与收藏</a>
                <dl class="layui-nav-child">
                    <dd <?php if($t == 6): ?> class="layui-this" <?php endif; ?>><a href="<?php echo url('comment/index'); ?>">评论列表</a></dd>
                    <dd <?php if($t == 7): ?> class="layui-this" <?php endif; ?>><a href="<?php echo url('collection/index'); ?>">收藏记录</a></dd>

                </dl>
            </li>-->

            <!-- <li class="layui-nav-item"><a href="">云市场</a></li>
             <li class="layui-nav-item"><a href="">发布商品</a></li>-->
        </ul>
    </div>
</div>
    <style>
        .layui-table-cell{
            height: 33px;
        }
    </style>



    <div class="layui-body">
        <!-- 内容主体区域 -->
        <div style="padding: 15px;">


            <fieldset class="layui-elem-field layui-field-title"  style="margin-top: 50px;">
                <legend>导出列表</legend>
            </fieldset>


            <table class="layui-hide" id="list"></table>



            <script>

                // 实现方法
                // @param name { String } 需要返回的属性名
                // @param arr { Array } 原始数据
                // @return ret { Array } 返回值
                function getParamValues(name, arr) {
                    var ret = []
                    for (var i = 0, len = arr.length; i < len; i++) {
                        ret.push(arr[i][name])
                    }
                    return ret
                }

                layui.use(['table','layer'], function(){
                    var table = layui.table;

                    table.render({
                        elem: '#list'
						,limits: [10,20,30,40,50,60,70,80,90,100,150,200]
                        ,url: "<?php echo url('Data/listjson'); ?>"
                        ,cols: [[
                            {type:'checkbox',width:'3%'}
                            ,{field:'id', width:'10%', title: 'ID', sort: true}
                            ,{field:'filename', width:'15%', title: '文件名'}
                            ,{field:'status', width:'15%', title: '状态',sort: true}
                            ,{field:'create_time', width:'15%', title: '创建时间'}
                            ,{field:'operation', minWidth: '200', title: '操作',templet: '#operation'}
                        ]]
                        ,page: true,
                        id:'tb'
                    });






                });
            </script>
            <script type="text/html" id="operation">

                <a class="layui-btn layui-btn-normal" href="{{d.filepath}} " >下载</a>
                <a class="layui-btn layui-btn-danger delbtn"  onclick=" return confirm('你真的要删除这个文件吗')" href="<?php echo url('Data/delete' ); ?>?uid={{d.id}}& " >删除</a>
            </script>

        </div>
    </div>


</div>

<script>

    //JavaScript代码区域
    layui.use('element', function(){
        var element = layui.element;

    });
    $('#logout').click(function (e) {
        e.preventDefault();
        layui.use('layer', function(){
            var layer = layui.layer;

            layer.confirm('你真的要退出吗？',['yes','no'],function () {
                location.href="<?php echo url('login/logout'); ?>";
            },function () {
                
            })
        });
    })

    layui.use('laydate', function(){
        var laydate = layui.laydate;
        //常规用法
        laydate.render({
            elem: '#start_date'
            ,max: 0 //7天后
        });
        laydate.render({
            elem: '#end_date'
            ,max: 0 //7天后
        });
    });




</script>

</body>
</html>